{% block date %}
    {% if admin %}
    <form class="form"  name="{{ calendar.type }}" action="/exposition/update_date" method="post">
        <div class="calendar">
            <table>
                <tr>
                    <td colspan="2">
                        <input class="text-input" name="{{ calendar.type }}" value="{{ calendar.value }}" type="text" />
                    </td>
                    <td>
                        <input class="button" name="update" value="Update" type="submit" />
                    </td>
                </tr>
                <tr>
                    <td colspan="3">&nbsp;</td>
                </tr>
                <tr>
                    <td><input class="button" name="year_down" value="&lt;" type="submit" /></td>
                    <th>{{ calendar.year }}</th>
                    <td><input class="button" name="year_up" value="&gt;" type="submit" /></td>
                </tr>
                <tr>
                    <td><input class="button" name="month_down" value="&lt;" type="submit" /></td>
                    <th>{{ calendar.month }}</th>
                    <td><input class="button" name="month_up" value="&gt;" type="submit" /></td>
                </tr>
                <tr>
                    <td colspan="3">&nbsp;</td>
                </tr>
                <tr>
                    <td colspan="3">
                        <div class="calendar-day">
                            <table>
                                <tr>
                                    <th>Mo</th>
                                    <th>Tu</th>
                                    <th>We</th>
                                    <th>Th</th>
                                    <th>Fr</th>
                                    <th>Sa</th>
                                    <th>Su</th>
                                </tr>
                                {% for week in calendar.days %}
                                    <tr>
                                        {% for day in week %}
                                            {% ifequal day 0 %}
                                            <td>&nbsp;</td>
                                            {% else %}
                                            <td><input class="button" name="day" value="{{ day }}" type="submit" /></td>
                                            {% endifequal %}
                                        {% endfor %}
                                    </tr>
                                {% endfor %}
                            </table>
                        </div>
                    </td>
                </tr>
            </table>
        </div>
        <input name="calendar_type" value="{{ calendar.type }}" type="hidden" />
        <input name="exposition_key" value="{{ exposition.key }}" type="hidden" />
        <input name="size_key" value="{{ size.key }}" type="hidden" />
        <input name="language_key" value="{{ language.key }}" type="hidden" />
    </form>
    {% endif %}
{% endblock %}
